﻿<%@ Page Language="C#" MasterPageFile="~/U_masterP.master" AutoEventWireup="true"
    CodeFile="buyerOrder.aspx.cs" Inherits="buyerOrder" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<%@ Register Src="uc_main/sideBar_right.ascx" TagName="sideBar_right" TagPrefix="uc1" %>
<%@ Register Src="uc_main/menu_canhan.ascx" TagName="menu_canhan" TagPrefix="uc2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <style>
        #content_left2
        {
            width: 100%;
            margin: 0px 0px;
            float: left;
            position: relative;
            min-height: 700px;
        }
    </style>
    <div id="content_top">
        <%--<asp:CheckBox ID="CheckBox1" runat="server"/>--%>
        <div id="kep">
            <a href="#">Trang cá nhân</a></div>
        <div id="tags">
            <div id="result">
            </div>
            <% if (Session["KhachHang"] != null)
               { %>
            <div id="Iwill">
                Tôi sẽ
                <asp:TextBox ID="TextBox1" CssClass="txtTieptuc" Width="400px" runat="server" MaxLength="200"
                    onkeyup="valid(this,'special')" onblur="valid(this,'special')"></asp:TextBox>
                chỉ với 5$.
                <ajaxToolkit:FilteredTextBoxExtender ID="TextBox1_FilteredTextBoxExtender" runat="server"
                    FilterMode="InvalidChars" InvalidChars="!@#$%^&amp;*()_-+=\|{}[]&quot;':,&lt;&gt;.?/"
                    TargetControlID="TextBox1">
                </ajaxToolkit:FilteredTextBoxExtender>
                <div id="btn_tieptuc">
                    <asp:Button ID="btnTiep2" CssClass="tieptuc" runat="server" OnClientClick="return checkTT()"
                        Text="Tiếp tục" OnClick="btnTiep2_Click" /></div>
            </div>
            <% }
               else { } %>
        </div>
        <%--<a href="#">
                    <img alt="X" src="img/dky.png" /></a>--%>
    </div>
    <div class="clear">
    </div>
    <div id="sub_content">
        <div id="content_left2">
            <!-- noi dung chinh -->
            <uc2:menu_canhan ID="menu_canhan1" runat="server" />
            <div id="main_canhan">
                <div>
                    <ul class="buyerorder-action">
                        <li style="float: left"><a href="<%= ResolveClientUrl("~/buyerOrder.aspx") %>">Đang
                            hoạt động
                            <asp:Label runat="server" ID="lblTotal">10</asp:Label></a></li>
                        <li style="float: left"><a href="<%= ResolveClientUrl("~/buyerOrder.aspx?action=completed") %>">
                            Hoàn thành
                            <asp:Label runat="server" ID="lblCompleted">10</asp:Label></a></li>
                        <li style="float: left"><a href="<%= ResolveClientUrl("~/buyerOrder.aspx?action=cancelled") %>">
                            Đã hủy
                            <asp:Label runat="server" ID="lblCanceled">10</asp:Label></a></li></ul>
                </div>
                <div style="clear: both">
                </div>
                <%-- <asp:GridView ID="GridView1" GridLines="None" CssClass="shoppingTable" runat="server"
                    AutoGenerateColumns="False" AllowPaging="True" Width="100%" OnRowDeleting="GridView1_RowDeleting"
                    OnRowEditing="GridView1_RowEditing" EmptyDataText="Bạn chưa giao dịch !" AllowSorting="True"
                    CellPadding="0">
                    <Columns>
                        <asp:TemplateField HeaderText="Ngày đặt" HeaderStyle-HorizontalAlign="Left">
                            <ItemTemplate>
                                <%#string.Format("{0:dd/MM/yyyy}",Eval("NgayDat")) %>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Yêu cầu" HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="Left"
                            ItemStyle-VerticalAlign="Middle">
                            <ItemTemplate>
                                <a href='orders.aspx?id=<%# Eval("idDH") %>'>
                                    <%#Eval("Gig.TenCongViec")%></a>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Tình trạng" ItemStyle-HorizontalAlign="Center" ItemStyle-VerticalAlign="Middle">
                            <ItemTemplate>
                                <div class="order-status">
                                    <%#Eval("StatusStr") %>
                                </div>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-VerticalAlign="Middle">
                            <ItemTemplate>
                                5 $
                            </ItemTemplate>
                        </asp:TemplateField>
                       <asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-VerticalAlign="Middle">
                            <ItemTemplate>
                                <a href='orderCancel.aspx?type=1&id=<%# Eval("idDH") %>'>Hủy</a> | <a href='buyerOrderConfirm.aspx?type=1&id=<%# Eval("idDH") %>'>
                                    Xác nhận hoàn thành</a>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                </asp:GridView>--%>
                <asp:Repeater runat="server" ID="GridView1">
                    <HeaderTemplate>
                        <div class="datalist-item datalist-item-first ">
                            <div class="datalist-item-date">
                                <b>Ngày</b>
                            </div>
                            <div class="datalist-item-title">
                                <b>Yêu cầu</b>
                            </div>
                            <div class="datalist-item-status">
                                <b>Trạng thái</b>
                            </div>
                            <div class="datalist-item-total">
                                &nbsp
                            </div>
                        </div>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <div class="datalist-item">
                            <div class="datalist-item-date">
                                <%#string.Format("{0:dd/MM/yyyy}",Eval("NgayDat")) %>
                            </div>
                            <div class="datalist-item-title">
                                <a href='orders.aspx?id=<%# Eval("idDH") %>'>
                                    <%#Eval("Gig.TenCongViec")%></a>
                            </div>
                            <div class="datalist-item-status ">
                                <div class="<%#Eval("StatusCode") %>">
                                    <%#Eval("StatusStr") %></div>
                            </div>
                            <div class="datalist-item-total ">
                                <b>$5</b>
                            </div>
                        </div>
                    </ItemTemplate>
                </asp:Repeater>
                <div class="pager">
                    <webdiyer:AspNetPager ID="AspNetPager1" runat="server" HorizontalAlign="Left" Width="100%"
                        PageIndexBoxType="DropDownList" PageSize="15" OnPageChanged="AspNetPager1_PageChanged"
                        AlwaysShowFirstLastPageNumber="true" FirstPageText="First" PrevPageText="Previous"
                        NextPageText="Next" LastPageText="Last">
                    </webdiyer:AspNetPager>
                </div>
            </div>
            <!-- ket  thuc noi dung -->
        </div>
        <%-- <div id="content_right">
            <uc1:sideBar_right ID="sideBar_right1" runat="server" />
        </div>--%>
    </div>
    <script type="text/javascript">
     var r = {
            'special': /['\\!@#$%^&*\()\{\}\[\]\"\b\/\|\+=_\-<>,;?']/g, ///[\W]/g,
            'quotes': /['\''&'\"']/g,
            'notnumbers': /[^\d]/g,
            'custum': /['\\!@#$%^&*\()\"\b\/\|\:+=_\-<>;.?']/g,
            'email': /['\\!#$%^&*\()\"\b\/\|\:+=_\-<>;?']/g
        }

        function valid(o, w) {
            o.value = o.value.replace(r[w], '');
        }
        function checkTT() {
            if ($('.txtTieptuc').val() == "") {
                alert('Không được để trống ');
                $('.txtTieptuc').focus();
                return false;
            }
        }
    </script>
</asp:Content>
